home *** CD-ROM | disk | FTP | other *** search
- Path: norconnect.no!not-for-mail
- From: kenneth@norconnect.no (Kenneth C. Nilsen)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Removing a patch -A POSSIBLE SOULTION
- Date: 30 Jan 1996 19:52:40 +0100
- Organization: NorConnect Internet Services AS
- Message-ID: <1224.6603T1039T2442@norconnect.no>
- References: <1996Jan29.141204.23597@ludens> <2650.6603T32T2733@norconnect.no>
- NNTP-Posting-Host: norconnect.no
- X-Newsreader: THOR 2.21 (Amiga;SOUP)
-
- >Your patch need something like this:
- >Not in use -> Forbid() -> Remove -> Compare new pointer ->
- >Is it the same as the pointer to your code when you installed your patch?
- > no -> reinstall/enable() and wait/retry/prompt
- > yes -> remove/enable()
-
- Hi again. My small greys have though all night so here is another possible
- checking routine before removing a patch:
-
- Lets say we patched intuition.library/OpenScreen()
-
- [bla bla..install patch etc...bla bla]
-
- (We want to remove the patch..) :
- bsr.b Check
-
- [bla bla]
-
-
- Check: move.l $4.w,a6 ;exec base
- Call Forbid
-
- move.l IntuitionBase(pc),a1
- move.l _LVOOpenScreen(a1),d0 ;current pointer to function
- move.l #Patch,d1 ;our patch
- cmp.l d0,d1
- beq.b .okRemove ;it's our patch level: we can remove it
-
- Call Permit
- rts ;don't remove patch!!
-
- .okRemove
- ;we have IntBase in a1 from check
- move.l d0,a0 ;we have _LVOOpe.. in d0 from check
- move.l OldFunc(pc),d0
- Call SetFunction
-
- Call Permit
- rts
-
-
- Patch: (Our Patch Routine)
-
- [bla bla]
-
-
- ---
- CREATIVE LINKS __ Kenneth C. Nilsen
- http://www.norconnect.no/~kenneth /_/\ e-mail: kenneth@norconnect.no
- "Everything you want" \_\/ Software & MultiMedia developer
-